// import com.alibaba.druid.sql.ast.SQLExpr_ptr;
// import com.alibaba.druid.sql.ast.SQLStatement;
// import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlStatementImpl;
// import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

// import java.util.ArrayList;
// import java.util.List;

#include "MySqlRepeatStatement.h"
#include "../../visitor/MySqlASTVisitor.h"
#include "../../../../../utils/listTran.h"

MySqlRepeatStatement::MySqlRepeatStatement()
{
  statements = std::make_shared<std::list<SQLStatement_ptr>>();
}
// @Override
void MySqlRepeatStatement::accept0(MySqlASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(MySqlRepeatStatement)))
  {
    SQLObject_list_ptr tmp1 = ListTran::tran_class<SQLStatement, SQLObject>(statements);
    acceptChild(visitor, tmp1);
    acceptChild(visitor, condition);
  }
  visitor->endVisit(SharedObject(MySqlRepeatStatement));
}

SQLStatement_list_ptr MySqlRepeatStatement::getStatements()
{
  return statements;
}

void MySqlRepeatStatement::setStatements(SQLStatement_list_ptr statements)
{
  this->statements = statements;
}

string_ptr MySqlRepeatStatement::getLabelName()
{
  return labelName;
}

void MySqlRepeatStatement::setLabelName(string_ptr labelName)
{
  this->labelName = labelName;
}

SQLExpr_ptr MySqlRepeatStatement::getCondition()
{
  return condition;
}

void MySqlRepeatStatement::setCondition(SQLExpr_ptr condition)
{
  this->condition = condition;
}
